package org.wenshu.ai.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@Configuration
@ConfigurationProperties(prefix = "ai.model")
public class AiModelConfig {
    
    private LlmConfig llm;
    private EmbeddingConfig embedding;
    private VectorStoreConfig vectorStore;
    
    @Data
    public static class LlmConfig {
        private String baseUrl;
        private String apiKey;
        private String modelName;
        private Double temperature;
        private Integer timeoutSeconds;
        private Boolean logRequests;
        private Boolean logResponses;
    }
    
    @Data
    public static class EmbeddingConfig {
        private String apiKey;
        private String modelName;
        private Integer timeoutSeconds;
        private Boolean lateChunking;
        private Boolean logRequests;
        private Boolean logResponses;
    }
    
    @Data
    public static class VectorStoreConfig {
        private String jdbcUrl;
        private String username;
        private String password;
        private Integer dimensions;
        private Collections collections;
        
        @Data
        public static class Collections {
            private String ddl;
            private String sql;
            private String doc;
        }
    }
}